import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/login.vue'
import Main from '../components/main.vue'
import User from '../components/SystemManage/user.vue'
import Menu from '../components/SystemManage/menu.vue'
import Manage1 from '../components/ProductManage/manage1.vue'
import Manage2 from '../components/ProductManage/manage2.vue'
import Manage3 from '../components/ProductManage/manage3.vue'
import Manage4 from '../components/ProductManage/manage4.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/login'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/main',
    component: Main,
    children:[
      {
        path: '/user',
        component: User
      },
      {
        path: '/menu',
        component: Menu
      }, 
      {
        path: '/series',
        component: Manage1
      }, 
      {
        path: '/basic',
        component: Manage2
      }, 
      {
        path: '/recommend',
        component: Manage3
      }, 
      {
        path: '/check',
        component: Manage4
      }, 
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
